' Stephen Toub


Imports Microsoft.VisualBasic
Imports System
Imports System.IO
Imports System.Windows.Forms

Namespace C4F.DevKit.PreviewHandler.PreviewHandlerFramework
    Public MustInherit Class PreviewHandlerControl
        Inherits Form
        Protected Sub New()
            MyBase.FormBorderStyle = FormBorderStyle.None
        End Sub

        Public MustOverride Shadows Sub Load(ByVal file As FileInfo)
        Public MustOverride Shadows Sub Load(ByVal stream As Stream)

        Public Overridable Sub Unload()
            For Each c As Control In Controls
                c.Dispose()
            Next c
            Controls.Clear()
        End Sub

        Protected Shared Function CreateTempPath(ByVal extension As String) As String
            Return Path.GetTempPath() + Guid.NewGuid().ToString("N") & extension
        End Function
    End Class
End Namespace
